@extends('admin.main.layout')
@section('title', '产品价格列表')

@section('content')
<script type="text/javascript" src="/admin/js/product-pay.js?v={{ time() }}"></script>
<script src="https://file.wailian1.cn/assets/js/v2/qrcode.min.js"></script>
<meta name="csrf-token" content="{{ csrf_token() }}">

<div class="row">
    <div class="col-md-12">
        <div class="card">
            <div class="card-body" style="padding: 15px;">
                <div class="crypto-buy-sell-nav">
                    <div class="">
                        <form method="POST" action="{{ URL::current() }}">
                            @csrf
                            <input type="hidden" name="product_id" id="product_id" value="1">
                            <input type="hidden" name="month" id="month" value="1">
                            <input type="hidden" name="payment_id" id="payment_id" value="1">
                            <input type="hidden" name="device" id="device" value="pc">
                            <div id="products_pay" class="m-form-item">
                                <label>选择购买时长:</label>
                                <div class="badge-lists">
                                    <ul id="month_lists">
                                        <li data="1" class="active">一个月会员</li>
                                        <li data="12">一年会员</li>
                                    </ul>
                                </div>
                                <label>选择支付方式:</label>
                                <div class="badge-lists">
                                    <ul id="payment_lists">
                                        <li data="1" class="active">
                                            <span>微信支付</span>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                            <div class="price-money">
                                <font class="font">¥</font>
                                <span class="price" id="last_money">88.00</span>
                                <span class="font" id="price_notice"></span>
                            </div>
                            <div class="m-form-item">
                                <div onclick="wechatPay();" class="m-form-btn m-mr-1">立即发起支付</div>
                            </div>

                            <div class="wechat-pay-cotain">
                                <div id="qrcode" class="wechat-pay-cotain-qrcode"></div>
                                <input type="hidden" id="out_trade_no" value="">
                                <div class="wechat-pay-cotain-notice">
                                    <h3>微信扫码支付 <font>-</font> 元</h3>
                                    <h5>购买时长 <font>-</font> 个月,支付后请等待自动跳转</h5>
                                </div>
                            </div>

                            <div class="member-equity-notice">
                                免费链接仅能体验1小时，开通会员后则没有到期时间；年付会员打5折。
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<style type="text/css">
    .price-money{
        width: 100%;
        display: flex;
        flex-direction: row;
        margin-bottom: 10px;
        font-size: 14px;
        align-items: center;
    }
    .price-money .price{
        color: #fe2b38;
        font-size: 25px;
        margin: 0 5px;
    }
    .wechat-pay-cotain{
        width: 100%;
        height: auto;
        float: left;
        border: 1px solid #E6E6E6;
        margin: 15px 0px;
        padding: 15px;
        box-sizing: border-box;
        display: none;
    }
    .wechat-pay-cotain-qrcode{
        width: 120px;
        height: 120px;
        float: left;
    }
    .wechat-pay-cotain-qrcode img{
        width: 120px;
        height: 120px;
        float: left;
    }
    .wechat-pay-cotain-notice{
        width: calc(100% - 120px);
        height: 120px;
        float: left;
        padding: 30px 20px;
        box-sizing: border-box;
    }
    .wechat-pay-cotain-notice h3{
        width: 100%;
        height: 40px;
        float: left;
        color: #333333;
        margin: 0px;
        padding: 0px;
        font-size: 15px;
    }
    .wechat-pay-cotain-notice h5{
        width: 100%;
        height: 40px;
        float: left;
        color: #999999;
        margin: 0px;
        padding: 0px;
        font-size: 14px;
    }
</style>

@endsection
